home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / System / Infinity Windoid 2.5.1 / WindoidUtil.h < prev   
Encoding:
Text File  |  1994-01-15  |  2.5 KB  |  81 lines  |  [TEXT/MPS ]

  1. //******************************************************************************
  2. //
  3. //    WindoidUtil.h
  4. //
  5. //******************************************************************************
  6. #ifndef __WindoidUtil__
  7. #define __WindoidUtil__
  8.  
  9. //------------------------------------------------------------------------------
  10.  
  11. #ifndef __WindoidDefines__
  12. #include "WindoidDefines.h"
  13. #endif
  14.  
  15. //******************************************************************************
  16. //    Macros to make code cleaner
  17. //------------------------------------------------------------------------------
  18.  
  19. #define IsOdd(value) ((value) & 1)
  20. #define IsEven(value) (!IsOdd(value))
  21.  
  22. //******************************************************************************
  23. //    Prototypes
  24. //------------------------------------------------------------------------------
  25.  
  26. Boolean HasSystem7(void);
  27.  
  28. Boolean HasCQDraw(void);
  29.  
  30. //------------------------------------------------------------------------------
  31.  
  32. void SyncPorts(void);
  33.  
  34. #ifndef SYS7_OR_LATER
  35.     void OurDeviceLoop(RgnHandle drawingRgn, 
  36.                        DeviceLoopDrawingProcPtr drawingProc,
  37.                        long userData, DeviceLoopFlags flags);
  38. #else
  39.     #define OurDeviceLoop(drawingRgn, drawingProc, userData, flags)    \
  40.                DeviceLoop(drawingRgn, drawingProc, userData, flags)
  41. #endif
  42.  
  43. //------------------------------------------------------------------------------
  44.  
  45. void WctbForeColor(WindowPeek window, short partCode);
  46.  
  47. void WctbBackColor(WindowPeek window, short partCode);
  48.  
  49. //------------------------------------------------------------------------------
  50.  
  51. void AvgWctbForeColor(WindowPeek window, short light, short dark, short shade);
  52.  
  53. void AvgWctbBackColor(WindowPeek window, short light, short dark, short shade);
  54.  
  55. //------------------------------------------------------------------------------
  56.  
  57. void SwapForeBackColor(short variation);
  58.  
  59. void ColorsNormal(void);
  60.  
  61. //------------------------------------------------------------------------------
  62.  
  63. void FrameBox(const Rect *theRect);
  64.  
  65. void FrameTopLeftShading(Rect theRect);
  66.  
  67. void FrameBottomRightShading(Rect theRect);
  68.  
  69. //------------------------------------------------------------------------------
  70.  
  71. void GetGlobalMappingPoint(WindowPeek window, Point *thePoint);
  72.  
  73. void GetGlobalContentRect(WindowPeek window, Rect *contentRect);
  74.  
  75. //------------------------------------------------------------------------------
  76.  
  77. short CheckDisplay(short theDepth, short deviceFlags, 
  78.                    GDHandle targetDevice, WindowPeek window);
  79.  
  80. //******************************************************************************
  81. #endif